<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>图书名称 - 当当图书</title>
	<link href="<%= basePath %>css/comment.min.css" rel="stylesheet" charset="utf-8">
	<link href="<%= basePath %>css/header_150803.css" rel="stylesheet" type="text/css">
</head>

<body>
	<script type="text/javascript">
		function add(){
			var vid = document.getElementById("buynum").value; 
	        document.getElementById("buynum").value++; 
		}
		
		function sub(){
			var vid = document.getElementById("buynum").value;
			if(vid != 1){
				document.getElementById("buynum").value--; 
			}
		}
	</script>
	<!-- 顶部的空白 -->
	<div id="hd">
		<div id="tools">
			<div class="tools">
				<div class="ddnewhead_operate" dd_name="顶链接">
					<div class="new_head_znx" id="znx_content" style="display:none;"></div>
					<div class="ddnewhead_welcome" display="none;"></div>
				</div>
			</div>
		</div>
		
		<div id="header_end"></div>
		
		<!-- 搜索框、购物车和订单的显示 -->
		<div style="position:relative;" class="logo_line_out">
			<div class="logo_line" dd_name="搜索框">
			
				<!-- logo图标 -->
				<div class="logo">
					<img src="<%= basePath %>images/logoshuangshiyi.gif" usemap="#logo_link">
					<map name="logo_link" id="logo_link" dd_name="logo区">
						<area shape="rect" coords="0,18,200,93" href="#" title="当当" onfocus="this.blur();">
						<area shape="rect" coords="200,18,320,93" href="#" title="" target="_blank" onfocus="this.blur();">
					</map>
				</div>
				
				<!-- 搜索框 -->
				<div class="search">
					<form action="<%= basePath %>/index" id="form_search_new" method="POST">
					
						<!-- 搜索输入框（如果需要修改记得修改name属性） -->
						<input type="text" class="text gray" name="keyword" id="key_S" autocomplete="off" onclick="key_onclick(event);" onfocus="key_onfocus(event);" onblur="key_onblur();" onbeforepaste="onpaste_search();">
						
						<a href="javascript:void(0);" onclick="clearkeys();" class="del-keywords"></a>
						
						<!-- 立即搜索 -->
						<span class="select">
							<span id="Show_Category_Name" dd_name="全部分类">立即搜索</span>
						</span>
						
						<!-- 搜索按钮 -->
						<input type="submit" id="search_btn" dd_name="搜索按钮" style="display:none">
						<input type="button" class="button" dd_name="搜索按钮" onclick="javascript:document.getElementById(&#39;search_btn&#39;).click();">
					</form>
				</div>
    
				<div id="suggest_key" class="suggest_key" style="display: none;"></div>
				
				<!-- 购物车组件 -->
				<div class="ddnew_cart">
					<a href="javascript:AddToShoppingCart(0);" name="购物车" 
						dd_name="购物车">
						<i class="icon_card"></i>购物车
						<b id="cart_items_count">${count}</b>
					</a>
				</div>
				
				<!-- 订单组件 -->
				<div class="ddnew_order">
					<a target="_blank" href="<%= basePath %>user/initpage" name="个人中心" dd_name="个人中心" rel="nofollow">
						个人中心
						<b id="unpaid_num" style="color:#ff2832;font:bold 12px Arial;"></b>
					</a>
				</div>
			</div>
		</div>
		
		<!-- 这里原本是一个导航条，被我改成了查询全部的按钮 -->
		<div class="nav_top">
			<div class="nav_top">
				<ul>
					<li class="all">
						<!-- 查询全部商品 -->
						<a href="<%= basePath %>/" id="a_category" name="cate" class="sort_button" target="_blank">全部商品信息</a>
					</li>
				</ul>
			</div>
		</div>
	</div>
	</div>
	
	<!-- 原来这里是面包屑导航，被我改成一块用于分隔全部商品信息链接和下面信息的空白 -->
	<div class="product_wrapper">
		<div class="breadcrumb" id="breadcrumb">
    </div>

	</div>

    <!-- 商品详情展示区 -->
    <div class="product_main clearfix" dd_name="单品区域">
        <div class="pic_info">
		
            <!-- 商品图片展示 -->
			<div class="pic" id="largePicDiv">
				<a href="javascript:;" class="img">
                	<!-- 真正的大图！！！！！！ -->
					<img id="largePic" dd_name="大图" alt="${item.gname }图片无法加载" src="<%= basePath %>${item.gimg}" width="320" height="320">
				</a>
				<span class="icon_promote" id="main-image-icon" style=""></span>
				
				<div style="display:none" id="promo-icon-tpl"></div>

				<a href="#" class="icon_online" target="_blank"></a>
				
				<div class="big_pic" style="display: none;" id="detailPicDiv">
					<img src="" alt=#" height="800" width="800" id="detailPic">
				</div>
			</div>

			<div class="dp_slide">
				<a id="pre_slide" href="#" class="mainimg_fy prev  prev_none" style="z-index: 100; display: none;"></a>
				
				<a id="next_slide" href="#" class="mainimg_fy next prev_none" style="z-index: 100; display: none;"></a>
				
				<div class="dp_slide_box" id="main-img-slide" style="visibility: visible; overflow: hidden; position: relative; z-index: 2; left: 0px; width: 295px;"></div>
			</div>
			
			<!-- 分享和收藏的超链接（摆设） -->
			<div class="share_div clearfix"></div>
		</div>
		
		<!-- 商品详细信息 -->
        <div class="show_info">
            <div class="sale_box clearfix">
                <div class="sale_box_left">
                    <!-- 标题区begin -->
                    <div class="name_info">
    
						<!-- 主标题 -->
						<h1 title="商品名称">
							${item.gname }
						</h1>
		
						<!-- 副标题、促销语 -->
						<h2>
							<span class="head_title_name" title="副标题">
								<a target="_blank" href="#">
									快来抢购吧！</a>
								<br>
							</span>
							
							<span class="hot" title="副标题">
							</span>
							
							<span class="yushou" id="presale-title" style="display: none;"></span>
						</h2>
					</div>
					
					<!-- 标题区 end-->
					
					<!-- 价格区begin -->
					<div class="price_info clearfix">
						<!-- -->
						<div class="price_pc" id="pc-price">
							<div class="price_d">
								<p class="t" id="dd-price-text">定价</p>
								<p id="dd-price">
									<span class="yen">&yen;</span>${item.gprice }</p>
							</div>
							<div class="price_zhe" id="dd-zhe"></div>
						</div>
						<div class="price_e">
							<p class="t">库存</p>
							<p>
								<a href="/1900280499.html" target="_blank" id="e-book-price">
									${item.gcount}件
								</a>
							</p>
							<p></p>
						</div>
						</div>
						
						<!-- 地址区（写死） -->
						<div class="area_info clearfix">
							<div class="left letter03">配送至</div>
								<div class="right" id="geo-info" style="">
									<div class="select_add clearfix">
									<span class="text" id="geo-name" dd_name="配送至">太原市小店区</span>
									<b>有货</b>
								</div>
							</div>
						</div>

						<!-- 按钮区begin -->
						<div class="buy_box clearfix">
						
							<form action="<%= basePath %>addToShoppingCart${item.gid}" method="post"
								name="buyform">
								<!-- 购买数量 -->
								<div class="num">
									<a href="javascript:add();" class="num_add" id="num_add" dd_name="数量加"></a>
								
									<input id="buynum" class="text" name="count" 
										<c:if test="${item.gcount > 0}">value="1"</c:if>
										<c:if test="${item.gcount == 0 }">value="0"</c:if>
									type="text">
									
									<a href="javascript:sub();" class="num_del num_disabled" id="num_del" dd_name="数量减"></a>
								</div>
								
								<!-- 加入购物车 -->
								<div class="buy_box_btn">
									<a href="javascript:buyform.submit();" id="part_buy_button" class="btn btn_red" dd_name="加入购物车" go-uri="#">
										<i class="cart"></i>加入购物车
									</a>
								</div>
							</form>
						</div>
					<div id="buy-tip" class="text"></div>
				</div>
                <!-- 按钮区 end-->
                </div>
				
				<!-- 更多服务 -->
                <div class="service_more" id="service-more">
					<div class="narrow_dang">
						<a href="javascript:void(0)" class="dang" id="shop_btn">
							<img src="<%= basePath %>images/narrow_dang.png" width="112" height="70">
						</a>
					</div>
					
					<div class="service_more_info">
						<p class="title clearfix">&nbsp;</p>
					</div>
				</div>          
			</div>
		</div>
    </div>
    <!-- 图书展示区 end -->
	
	<!-- 商品详情显示 -->
    <div class="product_content clearfix">
        <div class="main" id="right-content">
    		<div class="t_box" id="product_tab">
				<div id="tab-panels" class="tab_panel">
					<ul class="tab clearfix">
                        <li class="hover" id="detail_tab" name="__tab_detail_pub" dd_name="商品详情tab"> 商品详情
						</li>
                    </ul>
				</div>
				
				<!-- 商品详情 -->
				<div class="section" id="detail">

					<div class="no_detail">
						${item.gdesc}
					</div>

				</div>

				<!-- detail 说明end -->
				</div>
    		</div>
        </div>
    </div>
</body>
</html>